package com.adaxi.adc.business.vehicle.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.Getter;

import java.io.Serializable;
import java.util.Date;

/**
 * 司机及车辆信息表
 */
@Getter
@TableName(value = "adc_vehicle")
@Data
public class AdcVehicle implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 车辆ID
     * -- GETTER --
     * 车辆ID
     */
    @TableId
    private String id;
    /**
     * 车牌号码
     * -- GETTER --
     * 车牌号码
     */
    @TableField("vehicle_license")
    private String vehicleLicense;
    /**
     * 车辆载人数
     * -- GETTER --
     * 车辆载人数
     */
    @TableField("seat_capacity")
    private Integer seatCapacity;
    /**
     * 司机的真实姓名
     * -- GETTER --
     * 司机的真实姓名
     */
    private String name;
    /**
     * 司机用户名
     * -- GETTER --
     * 司机用户名
     */
    private String username;
    /**
     * 密码
     * -- GETTER --
     * 密码
     */
    private String password;
    /**
     * 邮箱
     * -- GETTER --
     * 邮箱
     */
    private String email;
    /**
     * 电话
     * -- GETTER --
     * 电话
     */
    private String phone;
    /**
     * 注册时间
     * -- GETTER --
     * 注册时间
     */
    @TableField("register_time")
    private Date registerTime;
    /**
     * 逻辑删除状态字段: 0 表示未删除, 1 表示已删除
     * -- GETTER --
     * 逻辑删除状态字段: 0 表示未删除, 1 表示已删除
     */
    @TableField("is_deleted")
    private Integer isDeleted;
    /**
     * 司机头像
     * -- GETTER --
     * 司机头像
     */
    @TableField("vehicle_photo")
    private String vehiclePhoto;

    /**
     * 车辆ID
     */
    public void setId() {
        this.id = id;
    }

    /**
     * 车牌号码
     */
    public void setVehicleLicense(String vehicleLicense) {
        this.vehicleLicense = vehicleLicense;
    }

    /**
     * 车辆载人数
     */
    public void setSeatCapacity(Integer seatCapacity) {
        this.seatCapacity = seatCapacity;
    }

    /**
     * 司机的真实姓名
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 司机用户名
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 密码
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 邮箱
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * 电话
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * 注册时间
     */
    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

    /**
     * 逻辑删除状态字段: 0 表示未删除, 1 表示已删除
     */
    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    /**
     * 司机头像
     */
    public void setVehiclePhoto(String vehiclePhoto) {
        this.vehiclePhoto = vehiclePhoto;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AdcVehicle other = (AdcVehicle) that;
        return (this.getId() == null ? other.getId() == null : this.getId()
                                                                   .equals(other.getId()))
                && (this.getVehicleLicense() == null ? other.getVehicleLicense() == null : this.getVehicleLicense()
                                                                                               .equals(other.getVehicleLicense()))
                && (this.getSeatCapacity() == null ? other.getSeatCapacity() == null : this.getSeatCapacity()
                                                                                           .equals(other.getSeatCapacity()))
                && (this.getName() == null ? other.getName() == null : this.getName()
                                                                           .equals(other.getName()))
                && (this.getUsername() == null ? other.getUsername() == null : this.getUsername()
                                                                                   .equals(other.getUsername()))
                && (this.getPassword() == null ? other.getPassword() == null : this.getPassword()
                                                                                   .equals(other.getPassword()))
                && (this.getEmail() == null ? other.getEmail() == null : this.getEmail()
                                                                             .equals(other.getEmail()))
                && (this.getPhone() == null ? other.getPhone() == null : this.getPhone()
                                                                             .equals(other.getPhone()))
                && (this.getRegisterTime() == null ? other.getRegisterTime() == null : this.getRegisterTime()
                                                                                           .equals(other.getRegisterTime()))
                && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted()
                                                                                     .equals(other.getIsDeleted()))
                && (this.getVehiclePhoto() == null ? other.getVehiclePhoto() == null : this.getVehiclePhoto()
                                                                                           .equals(other.getVehiclePhoto()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getVehicleLicense() == null) ? 0 : getVehicleLicense().hashCode());
        result = prime * result + ((getSeatCapacity() == null) ? 0 : getSeatCapacity().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getRegisterTime() == null) ? 0 : getRegisterTime().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getVehiclePhoto() == null) ? 0 : getVehiclePhoto().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ")
          .append(hashCode());
        sb.append(", id=")
          .append(id);
        sb.append(", vehicleLicense=")
          .append(vehicleLicense);
        sb.append(", seatCapacity=")
          .append(seatCapacity);
        sb.append(", name=")
          .append(name);
        sb.append(", username=")
          .append(username);
        sb.append(", password=")
          .append(password);
        sb.append(", email=")
          .append(email);
        sb.append(", phone=")
          .append(phone);
        sb.append(", registerTime=")
          .append(registerTime);
        sb.append(", isDeleted=")
          .append(isDeleted);
        sb.append(", vehiclePhoto=")
          .append(vehiclePhoto);
        sb.append(", serialVersionUID=")
          .append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
